{% extends 'admin/base.html' %}
{% block title %}个人信息{% endblock %}
{% block content %}
    <div class="grid grid-cols-1 grid-rows-2 lg:grid-cols-5 gap-2">
        <div class="col-span-2 card h-96 shadow group">
            <figure class="w-full">
                <img src="{{ url_for('static', filename='img/auth_bj.png') }}" class="group-hover:scale-105 transition-all duration-300"/>
            </figure>
            <div class="card-body flex flex-col justify-end items-start">
                <div class="text-xl">欢迎用户：{{ current_user.username }}</div>
                <div class="text-xl">当前权限：{{ current_user.authority_name }}</div>
                <div class="text-xl">登录时间：{{ current_user.login_time }}</div>
                <div class="text-xl">注册时间：{{ current_user.register_time }}</div>
            </div>
        </div>
        <div class="col-span-3 card h-96 shadow">
            <div class="card-body h-96">
                <h2 class="card-title">修改密码</h2>
                <form action="{{ url_for('admin.user_info') }}" method="post" class="flex flex-col gap-4 py-2">
                    {{ edit_user_info.csrf_token() }}
                    <label class="input input-bordered flex items-center gap-2 w-full rounded-lg">
                        <svg
                                xmlns="http://www.w3.org/2000/svg"
                                viewBox="0 0 16 16"
                                fill="currentColor"
                                class="h-5 w-5 opacity-70">
                            <path d="M8 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM12.735 14c.618 0 1.093-.561.872-1.139a6.002 6.002 0 0 0-11.215 0c-.22.578.254 1.139.872 1.139h9.47Z"></path>
                        </svg>
                        {{ edit_user_info.username(class="grow", value=current_user.username, disabled=True) }}
                    </label>

                    <label class="input input-bordered flex items-center gap-2">
                        <svg t="1721722047733" class="icon h-5 w-5" viewBox="0 0 1024 1024" version="1.1"
                             xmlns="http://www.w3.org/2000/svg" p-id="6272">
                            <path d="M732.6 440.5H363.2c6.4-52-39.7-263.2 130.5-268.3 161.8-6 136.6 192.7 136.6 192.7l79.2 0.5s23-266-215.9-267.3c-260.7 13-199.6 301.3-207.5 342.4h6.8c-52 0-94.2 41-94.2 91.4v304.8c0 50.5 42.2 91.4 94.2 91.4h439.7c52 0 94.2-41 94.2-91.4V532c0-50.5-42.2-91.5-94.2-91.5zM544.1 706.4v69.4c0 16.8-14.1 30.5-31.4 30.5-17.3 0-31.4-13.7-31.4-30.5v-69.4c-18.7-10.6-31.4-30-31.4-52.5 0-33.7 28.1-61 62.8-61 34.7 0 62.8 27.3 62.8 61 0 22.5-12.7 42-31.4 52.5z"
                                  fill="#626973" p-id="6273"></path>
                        </svg>
                        {{ edit_user_info.password_old(class="grow", placeholder=edit_user_info.password_old.label.text) }}
                    </label>

                    <label class="input input-bordered flex items-center gap-2">
                        <svg t="1721722111918" class="icon h-5 w-5" viewBox="0 0 1024 1024" version="1.1"
                             xmlns="http://www.w3.org/2000/svg" p-id="6584">
                            <path d="M773.973333 438.186667h-15.317333V368.085333c0-129.578667-105.088-237.781333-236.416-240.085333a543.616 543.616 0 0 0-14.378667 0c-131.328 2.304-236.416 110.506667-236.416 240.085333v70.016h-15.317333c-23.552 0-42.794667 23.808-42.794667 53.205334v351.274666C213.333333 871.978667 232.533333 896 256.128 896H773.973333c23.552 0 42.794667-24.021333 42.794667-53.376v-351.274667c0-29.44-19.2-53.205333-42.794667-53.205333z m-210.432 228.437333v106.154667a22.912 22.912 0 0 1-22.826666 22.442666H489.386667a22.912 22.912 0 0 1-22.869334-22.442666v-106.154667a62.464 62.464 0 0 1-19.072-45.44c0-33.664 26.624-62.592 60.416-63.914667 3.584-0.128 10.794667-0.128 14.378667 0 33.792 1.322667 60.416 30.293333 60.416 63.914667 0 17.749333-7.04 33.834667-19.114667 45.44z m94.293334-228.48H372.266667V368.128c0-77.184 64.128-140.970667 142.762666-140.970667 78.677333 0 142.805333 63.786667 142.805334 140.970667v70.016z"
                                  fill="#626973" p-id="6585"></path>
                        </svg>
                        {{ edit_user_info.password(class="grow", placeholder=edit_user_info.password.label.text) }}
                    </label>

                    <button class="btn btn-outline btn-primary w-full">修改</button>
                </form>
            </div>
        </div>
    </div>
{% endblock %}